<?php
namespace Mentees\Model;
use Think\Model;

class ConsultModel extends Model {

    protected $_validate = array (
    	array('time','require','Time cannot be empty', 1),
		array('address','require','Address cannot be empty', 1),
		array('content','require','Message cannot be empty', 1),
    );	

    protected $_auto = array (
    	array('date','_date',Model::MODEL_BOTH,'callback'),
		array('createTime','time',Model::MODEL_INSERT,'function'),    
	);

	protected function _date(){
        return strtotime(I('post.date'));
    }
}
?>